package top.fangw.admin.pojo.entity;

import com.baomidou.mybatisplus.annotation.FieldStrategy;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import top.fangw.common.core.entity.BaseEntity;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;
import top.fangw.common.core.entity.CreateEntityWithOutId;

/**
 * <p>
 * 用途：存储用户和机构的关联信息
 * </p>
 *
 * @author fangw
 * @since 2024-03-02
 */
@Getter
@Setter
@Accessors(chain = true)
@TableName("tbl_sys_user_join_org")
@Schema(name = "SysUserJoinOrg", description = "用途：存储用户和机构的关联信息")
public class SysUserJoinOrg extends CreateEntityWithOutId {
    
    @Schema(description = "用户编号")
    @TableId("user_id")
    private String userId;

    @Schema(description = "机构编号")
    @TableField(value = "org_id", insertStrategy = FieldStrategy.ALWAYS)
    private String orgId;

    @Schema(description = "1-公司，2-部门 3-小组")
    @TableField("type")
    private String type;

    @Schema(description = "是否是主部门 0:不是 1: 是")
    @TableField("is_main")
    private String isMain;

    @Schema(description = "租户id")
    @TableField("tenant_id")
    private String tenantId;
}
